﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;

/// <summary>
///PubTool 的摘要说明
/// </summary>
public class PubNews
{
    public PubNews()
    {
        //
        //TODO: 在此处添加构造函数逻辑
        //
    }

    /// <summary>
    /// 根据文章ID取文章概要
    /// </summary>
    /// <param name="ID"></param>
    /// <returns></returns>
    public string GetBriefByID(long ID)
    {
        string rel = "";
        try
        {
            Basic bc = new Basic();
            string str = Pub.LoadData(bc.jsonUrl + "/news/UNews.ashx?id=" + ID);
            NewsContentEnty obj = JsonConvert.DeserializeObject<NewsContentEnty>(str);
            if (obj != null)
            {
                rel = obj.Summary;
            }
        }
        catch { }
        return rel;
    }

}